package com.artpri.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * ShopCart entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "shop_cart", catalog = "jpw")
public class ShopCart implements java.io.Serializable {

	// Fields

	private Integer cartId;
	private Integer userNum;
	private Integer goodsNum;
	private Double cartPrice;
	private Integer cartNum;
	private String cartName;
	private Timestamp createTime;

	// Constructors

	/** default constructor */
	public ShopCart() {
	}

	/** full constructor */
	public ShopCart(Integer userNum, Integer goodsNum, Double cartPrice,
			Integer cartNum, String cartName, Timestamp createTime) {
		this.userNum = userNum;
		this.goodsNum = goodsNum;
		this.cartPrice = cartPrice;
		this.cartNum = cartNum;
		this.cartName = cartName;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "cart_id", unique = true, nullable = false)
	public Integer getCartId() {
		return this.cartId;
	}

	public void setCartId(Integer cartId) {
		this.cartId = cartId;
	}

	@Column(name = "user_num", nullable = false)
	public Integer getUserNum() {
		return this.userNum;
	}

	public void setUserNum(Integer userNum) {
		this.userNum = userNum;
	}

	@Column(name = "goods_num", nullable = false)
	public Integer getGoodsNum() {
		return this.goodsNum;
	}

	public void setGoodsNum(Integer goodsNum) {
		this.goodsNum = goodsNum;
	}

	@Column(name = "cart_price", nullable = false, precision = 10)
	public Double getCartPrice() {
		return this.cartPrice;
	}

	public void setCartPrice(Double cartPrice) {
		this.cartPrice = cartPrice;
	}

	@Column(name = "cart_num", nullable = false)
	public Integer getCartNum() {
		return this.cartNum;
	}

	public void setCartNum(Integer cartNum) {
		this.cartNum = cartNum;
	}

	@Column(name = "cart_name", nullable = false, length = 60)
	public String getCartName() {
		return this.cartName;
	}

	public void setCartName(String cartName) {
		this.cartName = cartName;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

}